<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
  <head>
    <title>发布产品</title>
	<meta http-equiv="pragma" content="no-cache">
	<meta http-equiv="cache-control" content="no-cache">
	<meta http-equiv="expires" content="0">
	<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
	<meta http-equiv="description" content="This is my page">

	<link rel="stylesheet" type="text/css" href="<%=basePath%>admin/css/global.css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>admin/css/form.css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>admin/css/page.css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>admin/css/css3.css" />
	<link rel="stylesheet" type="text/css" href="<%=basePath%>admin/css/style.css" />
	<style type="text/css">
		div.wapper h2.pagerTitle {
			border-bottom:2px solid #C1D9FF;
		}
	</style>
  </head>
  
  <body>
   	<div class="wapper show tableContainer">
		<h2 class="pagerTitle tabTitle"><a class="tab tabActive">发布产品</a></h2>
		<form id="productform" name="newsform" enctype="multipart/form-data" method="post" action="addProduct.action">
		<div class="inputLabelParent">
		
			<div class="inputLabel">
			<label class="left">产品分类:</label>
				<select id="productCategory" name="pcId"></select>
			</div>
			<%--<div class="inputLabel">
			<label class="left">产品分类:</label>
			--%><input type="hidden" name="product.brand" id=brand value="产品品牌" class="text" style="width:300px;" maxlength="50"><span class="tips" id="branderror"><%--
			* 必填</span>
			</div>
			--%>
			
			<!-- <div class="inputLabel">
				<label class="left">产品类别:</label><input type="text" name="product.productid" id="productid" class="text"  style="width:300px;" maxlength="50"><span class="tips" id="introductionerror">* 必填</span>
			</div>
			 -->
			 <input type="hidden" value="1" name="product.productid" id="productid" class="text"  style="width:300px;" maxlength="50"><span class="tips" id="introductionerror">
			 
			<div class="inputLabel">
			<label class="left">产品名称:</label><input type="text" name="product.title" id="title" class="text" style="width:300px;" maxlength="50"><span class="tips" id="titleerror">* 必填，10字以内</span>
			</div>
			<div class="inputLabel">
			<label class="left">价格:</label><input type="text" name="price" id="price" class="text" style="width:300px;" maxlength="50" onkeypress="if(!this.value.match(/^[\+\-]?\d*?\.?\d*?$/))this.value=this.t_value;else this.t_value=this.value;if(this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?)?$/))this.o_value=this.value" onkeyup="if(!this.value.match(/^[\+\-]?\d*?\.?\d*?$/))this.value=this.t_value;else this.t_value=this.value;if(this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?)?$/))this.o_value=this.value" onafterpaste="if(!this.value.match(/^[\+\-]?\d*?\.?\d*?$/))this.value=this.t_value;else this.t_value=this.value;if(this.value.match(/^(?:[\+\-]?\d+(?:\.\d+)?)?$/))this.o_value=this.value"><span class="tips" id="priceerror">* 必填</span>
			</div>
			<div class="inputLabel">
			<label class="left">尺寸:</label><input type="text" name="product.productsize" id=productsize class="text" style="width:300px;" maxlength="50">
			<span class="tips" id="titleerror">* 可以多填，用英文的小写逗号“,”分隔</span>
			</div>
			<div class="inputLabel">
			<label class="left">款式:</label><input type="text" name="product.bspecification" id=bspecification class="text" style="width:300px;" maxlength="50">
			<span class="tips" id="titleerror">* 可以多填，用英文的小写逗号“,”分隔</span>
			</div>
			<div class="inputLabel">
			<label class="left">颜色:</label><input type="text" name="product.color" id=color class="text" style="width:300px;" maxlength="100">
			<span class="tips" id="titleerror">* 可以多填，用英文的小写逗号“,”分隔</span>
			</div>
			<div class="inputLabel">
			<label class="left">标签:</label><input type="text" name="product.standard" id=standard class="text" style="width:300px;" maxlength="50">
			<span class="tips" id="titleerror">* 可以多填，用英文的小写逗号“,”分隔</span>
			</div>
			<div class="inputLabel">
			<label class="left">主图片(175*175):</label><s:file id="picF" name="picF" />
			</div>
			<div class="inputLabel">
			<label class="left">展示图片1(450*450):</label><s:file id="pic" name="pic" />
			</div>
			<div class="inputLabel">
			<label class="left">展示图片2(450*450):</label><s:file id="pic" name="pic" />
			</div>
			<div class="inputLabel">
			<label class="left">展示图片3(450*450):</label><s:file id="pic" name="pic" />
			</div>
			<div class="inputLabel">
			<label class="left">展示图片4(450*450):</label><s:file id="pic" name="pic" />
			</div>
			<div class="inputLabel">
			<label class="left">是否热销产品:</label>
			<input type="radio" name="product.isHot" value="0" checked="checked" /> <label style="width:20px;">否</label>
			<input type="radio" name="product.isHot" value="1" /> <label style="width:20px;">是</label>
			</div>
			<%--<div class="inputLabel">
			<label class="left">供货时间:</label>
			--%><input type="hidden" name="product.days" value="11" id="days" class="text" style="width:300px;" maxlength="50" >
			<%--<span class="tips" id="titleerror">* 必填</span>
			</div>--%>
			
			<div class="inputLabel">
			<label class="left">淘宝链接:</label><input type="text" name="product.material" id=material class="text" style="width:300px;" maxlength="500">
			</div>
			

			<div class="inputLabel heightauto">
			<label class="left">产品介绍: </label><textarea name="product.content" ></textarea><span class="tips" id="introductionerror">* 必填</span>
			</div>
			<div style="clear:both; padding-left:500px;">
			<div class="submit submitFloat"><input type="button" id="saveNews" value="保存" /> 
			</div>
			</div>
		</div>
		</form>
		<input type="hidden" id="errorinfo" value="${errorinfo}" />
   	</div>
   
   
   		<script type="text/javascript" src="<%=basePath%>/admin/js/jquery.js"></script>
		<script type="text/javascript" src="<%=basePath%>/admin/js/jqueryui.js"></script>
		<script type="text/javascript" src="<%=basePath%>/admin/js/simpleDialog.js"></script>
		<script type="text/javascript" src="<%=basePath%>/admin/product/js/checkForm.js"></script>
		<script type="text/javascript" src="<%=basePath%>/admin/fckeditor/fckeditor.js"> </script> 
   		<script language="JavaScript" type="text/javascript" charset="utf-8"> 
    		window.onload = function() { 
    		var oFCKeditor = new FCKeditor( 'product.content' ) ; 
    		oFCKeditor.BasePath = '<%=basePath%>/admin/fckeditor/';        
    		oFCKeditor.Height = 450 ;       
   			oFCKeditor.Width = 630 ;        
			oFCKeditor.ToolbarSet = 'Default';
			oFCKeditor.Config["CustomConfigurationsPath"]="<%=basePath%>/admin/fckeditor/myconfig.js";
			oFCKeditor.ReplaceTextarea();
    }
	</script> 
   
  </body>
</html>
